/**
 * create ns if not already done
  */
var net = net || {};
net.andersand = net.andersand || {};

$(function() {

    // config:
    var logElementID = "#console";

    var Logger = function() {
        this.log = function(text, cssClassName) {
            var log = $(logElementID);
            var entry = document.createElement("p");
            entry.innerHTML = text;
            log.append(entry);
            if (cssClassName) {
                $(entry).addClass(cssClassName);
            }
        };
        this.prepend = function(text, cssClassName) {
            var log = $(logElementID);
            var entry = document.createElement("p");
            entry.innerHTML = text;
            log.prepend(entry);
            if (cssClassName) {
                $(entry).addClass(cssClassName);
            }
        };
        /**
         * @return {jQuery}
         */
        this.get = function() {
            return $(logElementID);
        };
    };

    net.andersand.util = {
        logger : new Logger()
    };

});